package cmpp.netty;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import cmpp.CmppServer;

public class StartMainListener implements ServletContextListener {
	public void contextInitialized(ServletContextEvent sce) {
		System.err.println("nettyListener Startup!");
		new Thread() {
			@Override
			public void run() {
				try {
					new CmppServer(7899).run();
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		}.start();

		System.err.println("nettyListener end!");
	}

	public void contextDestroyed(ServletContextEvent sce) {

	}
}